﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace NNLInterface
{
    public partial class frmBaseQueryXM : NNLInterface.frmBaseBasicM
    {

        
        public frmBaseQueryXM()
        {
            InitializeComponent();
            this.SetToolVisible(common.ToolVisible.QueryData);
            this.ListView.OptionsPrint.PrintDetails = true;
            ListView.OptionsPrint.ExpandAllDetails = true;
            ListView.OptionsPrint.ExpandAllGroups = true;
            this.ListView.CustomDrawRowIndicator += new DevExpress.XtraGrid.Views.Grid.RowIndicatorCustomDrawEventHandler(ListView_CustomDrawRowIndicator);
            ListView.IndicatorWidth = 25;

        }

        void ListView_CustomDrawRowIndicator(object sender, DevExpress.XtraGrid.Views.Grid.RowIndicatorCustomDrawEventArgs e)
        {
            e.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far;
            if (e.Info.IsRowIndicator)
            {
                if (e.RowHandle >= 0)
                {
                    e.Info.DisplayText = (e.RowHandle + 1).ToString();
                }
                else if (e.RowHandle < 0 && e.RowHandle > -1000)
                {
                    e.Info.Appearance.BackColor = System.Drawing.Color.AntiqueWhite;
                    e.Info.DisplayText = "G" + e.RowHandle.ToString();
                }
            }
        }
    }
}
